package test6

object TestImplic {
  implicit class RichInt(val self: Int) {
    def squareRoot(): Double = Math.sqrt(self)
  }

  def main(args: Array[String]): Unit = {

    val num:Int = 16
    println(num.squareRoot()) // 输出：4.0
  }
}
